package cn.iocoder.yudao.module.hs.dal.mysql.shipordertrayrecord;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hs.dal.dataobject.shipordertrayrecord.ShipOrderTrayRecordDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hs.controller.admin.shipordertrayrecord.vo.*;

/**
 * 出库单托盘记录 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface ShipOrderTrayRecordMapper extends BaseMapperX<ShipOrderTrayRecordDO> {

    default PageResult<ShipOrderTrayRecordDO> selectPage(ShipOrderTrayRecordPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ShipOrderTrayRecordDO>()
                .eqIfPresent(ShipOrderTrayRecordDO::getShipOrderId, reqVO.getShipOrderId())
                .eqIfPresent(ShipOrderTrayRecordDO::getWarehouseId, reqVO.getWarehouseId())
                .eqIfPresent(ShipOrderTrayRecordDO::getStatus, reqVO.getStatus())
                .betweenIfPresent(ShipOrderTrayRecordDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ShipOrderTrayRecordDO::getId));
    }

}